package com.weiyuwqj.server.service.push.impl;

import com.github.pagehelper.PageHelper;
import com.weiyuwqj.api.service.SysAppPushService;
import com.weiyuwqj.server.service.base.BaseServiceImpl;
import com.weiyuwqj.api.common.PageList;
import com.weiyuwqj.api.common.Paginator;
import com.weiyuwqj.server.mapper.SysAppPushMapper;
import com.weiyuwqj.api.model.SysAppPush;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by zhangyong on 2016/3/18.
 */
@Service("appPushService")
public class SysAppPushServiceImpl extends BaseServiceImpl<SysAppPush> implements SysAppPushService{

    @Autowired
    SysAppPushMapper appPushMapper;

    @Override
    public PageList getList(Paginator p, Map<String, Object> map) {
        PageHelper.startPage(p.getPageNum(), p.getPageSize());
        return new PageList(appPushMapper.getList(map));
    }
}
